package com.application.bisabahasakorea;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteConstraintException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class MyDatabaseHelper extends SQLiteOpenHelper {
	private static final String DATABASE_NAME = "hanguk";
	private static final int DATABASE_VERSION = 1;
	
	public static final String HURUF = "huruf";
	public static final String ANGKA = "angka";
	public static final String BAHASA = "bahasa";
	public static final String HANGUL = "hangul";
	public static final String ROMAJI = "romaji";
	public static final String V_HANGUL = "v_hangul";
	public static final String GRUP = "grup_percakapan";
	public static final String FAVORITE = "favorite";
	public static final String KEY_ID = "_id";
	public static final String NAMA_TABEL = "nama_tabel";
	
	/*START add sql code here */
	public static final String CREATE_TABLE_HURUF_VOKAL = 
		"CREATE TABLE IF NOT EXISTS HURUF_VOKAL (_id INTEGER PRIMARY KEY AUTOINCREMENT, "
		+ HANGUL + " TEXT, " +
		ROMAJI + " TEXT, " +
		BAHASA + " TEXT, " +
		V_HANGUL + " TEXT, " +
		FAVORITE + " INTEGER);";
	
	public static final String CREATE_TABLE_HURUF_KONSONAN = 
		"CREATE TABLE IF NOT EXISTS HURUF_KONSONAN (_id INTEGER PRIMARY KEY AUTOINCREMENT, "
		+ HANGUL + " TEXT, " +
		ROMAJI + " TEXT, " +
		BAHASA + " TEXT, " +
		V_HANGUL + " TEXT, " +
		FAVORITE + " INTEGER);";
	
	public static final String CREATE_TABLE_ANGKA_SINO = 
		"CREATE TABLE IF NOT EXISTS ANGKA_SINO (_id INTEGER PRIMARY KEY AUTOINCREMENT, "
		+ ANGKA + " TEXT, " +
		HANGUL + " TEXT, " +
		ROMAJI + " TEXT, " +
		V_HANGUL + " TEXT, " +
		FAVORITE + " INTEGER);";
	
	public static final String CREATE_TABLE_ANGKA_ASLI = 
		"CREATE TABLE IF NOT EXISTS ANGKA_ASLI (_id INTEGER PRIMARY KEY AUTOINCREMENT, "
		+ ANGKA + " TEXT, " +
		HANGUL + " TEXT, " +
		ROMAJI + " TEXT, " +
		V_HANGUL + " TEXT, " +
		FAVORITE + " INTEGER);";
		
	public static final String CREATE_TABLE_PERCAKAPAN_PERKENALAN = 
			"CREATE TABLE IF NOT EXISTS PERKENALAN (_id INTEGER PRIMARY KEY AUTOINCREMENT, "
			+ BAHASA + " TEXT, " +
			HANGUL + " TEXT, " +
			ROMAJI + " TEXT, " +
			V_HANGUL + " TEXT, " +
			FAVORITE + " INTEGER);";
	
	public static final String CREATE_TABLE_PERCAKAPAN_PERTEMUAN_PERTAMA = 
			"CREATE TABLE IF NOT EXISTS PERTEMUAN_PERTAMA (_id INTEGER PRIMARY KEY AUTOINCREMENT, "
			+ BAHASA + " TEXT, " +
			HANGUL + " TEXT, " +
			ROMAJI + " TEXT, " +
			V_HANGUL + " TEXT, " +
			FAVORITE + " INTEGER);";
	
	public static final String CREATE_TABLE_PERCAKAPAN_PERPISAHAN = 
			"CREATE TABLE IF NOT EXISTS PERPISAHAN (_id INTEGER PRIMARY KEY AUTOINCREMENT, "
			+ BAHASA + " TEXT, " +
			HANGUL + " TEXT, " +
			ROMAJI + " TEXT, " +
			V_HANGUL + " TEXT, " +
			FAVORITE + " INTEGER);";
	
	public static final String CREATE_TABLE_PERCAKAPAN_PENERBANGAN = 
			"CREATE TABLE IF NOT EXISTS PENERBANGAN (_id INTEGER PRIMARY KEY AUTOINCREMENT, "
			+ BAHASA + " TEXT, " +
			HANGUL + " TEXT, " +
			ROMAJI + " TEXT, " +
			V_HANGUL + " TEXT, " +
			FAVORITE + " INTEGER);";
	
	public static final String CREATE_TABLE_PERCAKAPAN_TERMINAL_KEDATANGAN = 
			"CREATE TABLE IF NOT EXISTS TERMINAL_KEDATANGAN (_id INTEGER PRIMARY KEY AUTOINCREMENT, "
			+ BAHASA + " TEXT, " +
			HANGUL + " TEXT, " +
			ROMAJI + " TEXT, " +
			V_HANGUL + " TEXT, " +
			FAVORITE + " INTEGER);";
	
	public static final String CREATE_TABLE_PERCAKAPAN_HOTEL = 
			"CREATE TABLE IF NOT EXISTS HOTEL (_id INTEGER PRIMARY KEY AUTOINCREMENT, "
			+ BAHASA + " TEXT, " +
			HANGUL + " TEXT, " +
			ROMAJI + " TEXT, " +
			V_HANGUL + " TEXT, " +
			FAVORITE + " INTEGER);";
	
	public static final String CREATE_TABLE_PERCAKAPAN_JALAN = 
			"CREATE TABLE IF NOT EXISTS JALAN (_id INTEGER PRIMARY KEY AUTOINCREMENT, "
			+ BAHASA + " TEXT, " +
			HANGUL + " TEXT, " +
			ROMAJI + " TEXT, " +
			V_HANGUL + " TEXT, " +
			FAVORITE + " INTEGER);";
	
	public static final String CREATE_TABLE_KOSAKATA_PERCAKAPAN = 
			"CREATE TABLE IF NOT EXISTS KOSAKATA (_id CHAR PRIMARY KEY , "
			+ BAHASA + " TEXT, " +
			HANGUL + " TEXT, " +
			ROMAJI + " TEXT, " +
			V_HANGUL + " TEXT, " +
			GRUP + " TEXT, " +
			FAVORITE + " INTEGER);";
	
	/*END add sql code*/
	
	
	public MyDatabaseHelper(Context context) {
		super(context, DATABASE_NAME, null, DATABASE_VERSION);
	}

	// method createTable untuk membuat table ANGKA_SINO
	public void createTable(SQLiteDatabase db) {
		db.execSQL( CREATE_TABLE_HURUF_VOKAL );
		db.execSQL( CREATE_TABLE_HURUF_KONSONAN );
		db.execSQL( CREATE_TABLE_ANGKA_SINO );
		db.execSQL( CREATE_TABLE_ANGKA_ASLI );
		db.execSQL( CREATE_TABLE_PERCAKAPAN_PERKENALAN );
		db.execSQL( CREATE_TABLE_PERCAKAPAN_PERTEMUAN_PERTAMA );
		db.execSQL( CREATE_TABLE_PERCAKAPAN_PERPISAHAN );
		db.execSQL( CREATE_TABLE_PERCAKAPAN_PENERBANGAN );
		db.execSQL( CREATE_TABLE_PERCAKAPAN_TERMINAL_KEDATANGAN );
		db.execSQL( CREATE_TABLE_PERCAKAPAN_HOTEL );
		db.execSQL( CREATE_TABLE_PERCAKAPAN_JALAN );
		db.execSQL( CREATE_TABLE_KOSAKATA_PERCAKAPAN );
	}

	// method generateData untuk mengisikan data ke table ANGKA_SINO.
	public void generateDataHurufVokal(SQLiteDatabase db) {
		ContentValues cv = new ContentValues();
		cv.put(HANGUL, "아");
		cv.put(ROMAJI, "A");
		cv.put(BAHASA, "Ayam");
		cv.put(V_HANGUL, "vokal_a");
		db.insert("HURUF_VOKAL", HANGUL, cv);	
		
		cv.put(HANGUL, "어");
		cv.put(ROMAJI, "Ou");
		cv.put(BAHASA, "Otak");
		cv.put(V_HANGUL, "vokal_ou");
		db.insert("HURUF_VOKAL", HANGUL, cv);
		
		cv.put(HANGUL, "오");
		cv.put(ROMAJI, "O");
		cv.put(BAHASA, "Orang");
		cv.put(V_HANGUL, "vokal_o");
		db.insert("HURUF_VOKAL", HANGUL, cv);
		
		cv.put(HANGUL, "우");
		cv.put(ROMAJI, "U");
		cv.put(BAHASA, "Udang");
		cv.put(V_HANGUL, "vokal_u");
		db.insert("HURUF_VOKAL", HANGUL, cv);	
		
		cv.put(HANGUL, "으");
		cv.put(ROMAJI, "Eu");
		cv.put(BAHASA, "Kelas");
		cv.put(V_HANGUL, "vokal_eu");
		db.insert("HURUF_VOKAL", HANGUL, cv);
		
		cv.put(HANGUL, "야");
		cv.put(ROMAJI, "Ya");
		cv.put(BAHASA, "Buyar");
		cv.put(V_HANGUL, "vokal_ya");
		db.insert("HURUF_VOKAL", HANGUL, cv);
		
		cv.put(HANGUL, "여");
		cv.put(ROMAJI, "You");
		cv.put(BAHASA, "Koyo");
		cv.put(V_HANGUL, "vokal_you");
		db.insert("HURUF_VOKAL", HANGUL, cv);	
		
		cv.put(HANGUL, "요");
		cv.put(ROMAJI, "Yo");
		cv.put(BAHASA, "Yoyo");
		cv.put(V_HANGUL, "vokal_yo");
		db.insert("HURUF_VOKAL", HANGUL, cv);
		
		cv.put(HANGUL, "유");
		cv.put(ROMAJI, "Yu");
		cv.put(BAHASA, "Kayu");
		cv.put(V_HANGUL, "vokal_yu");
		db.insert("HURUF_VOKAL", HANGUL, cv);
		
		cv.put(HANGUL, "이");
		cv.put(ROMAJI, "I");
		cv.put(BAHASA, "Ikan");
		cv.put(V_HANGUL, "vokal_i");
		db.insert("HURUF_VOKAL", HANGUL, cv);
		
		cv.put(HANGUL, "애");
		cv.put(ROMAJI, "Ae");
		cv.put(BAHASA, "Elang");
		cv.put(V_HANGUL, "vokal_ae");
		db.insert("HURUF_VOKAL", HANGUL, cv);	
		
		cv.put(HANGUL, "얘");
		cv.put(ROMAJI, "Yae");
		cv.put(BAHASA, "Yen");
		cv.put(V_HANGUL, "vokal_yae");
		db.insert("HURUF_VOKAL", HANGUL, cv);
		
		cv.put(HANGUL, "에");
		cv.put(ROMAJI, "E");
		cv.put(BAHASA, "Elang");
		cv.put(V_HANGUL, "vokal_e");
		db.insert("HURUF_VOKAL", HANGUL, cv);
		
		cv.put(HANGUL, "예");
		cv.put(ROMAJI, "Ye");
		cv.put(BAHASA, "Yel-yel");
		cv.put(V_HANGUL, "vokal_ye");
		db.insert("HURUF_VOKAL", HANGUL, cv);
		
		cv.put(HANGUL, "와");
		cv.put(ROMAJI, "Wa");
		cv.put(BAHASA, "Wanita");
		cv.put(V_HANGUL, "vokal_wa");
		db.insert("HURUF_VOKAL", HANGUL, cv);	
		
		cv.put(HANGUL, "왜");
		cv.put(ROMAJI, "Wae");
		cv.put(BAHASA, "Westernisasi");
		cv.put(V_HANGUL, "vokal_wae");
		db.insert("HURUF_VOKAL", HANGUL, cv);
		
		cv.put(HANGUL, "외");
		cv.put(ROMAJI, "We'");
		cv.put(BAHASA, "Bawel");
		cv.put(V_HANGUL, "vokal_we'");
		db.insert("HURUF_VOKAL", HANGUL, cv);
		
		cv.put(HANGUL, "워");
		cv.put(ROMAJI, "Wou");
		cv.put(BAHASA, "Wol");
		cv.put(V_HANGUL, "vokal_wou");
		db.insert("HURUF_VOKAL", HANGUL, cv);
		
		cv.put(HANGUL, "웨");
		cv.put(ROMAJI, "We");
		cv.put(BAHASA, "Wesel");
		cv.put(V_HANGUL, "vokal_we");
		db.insert("HURUF_VOKAL", HANGUL, cv);	
		
		cv.put(HANGUL, "위");
		cv.put(ROMAJI, "Wi");
		cv.put(BAHASA, "Wisata");
		cv.put(V_HANGUL, "vokal_wi");
		db.insert("HURUF_VOKAL", HANGUL, cv);
		
		cv.put(HANGUL, "의");
		cv.put(ROMAJI, "Eui");
		cv.put(BAHASA, "Euis");
		cv.put(V_HANGUL, "vokal_eui");
		db.insert("HURUF_VOKAL", HANGUL, cv);
		
	}
	
	public void generateDataHurufKonsonan(SQLiteDatabase db) {
		ContentValues cv = new ContentValues();
		cv.put(HANGUL, "ㄱ");
		cv.put(ROMAJI, "Giuk");
		cv.put(BAHASA, "Gigi / Kepala");
		cv.put(V_HANGUL, "konsonan_giuk");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㄴ");
		cv.put(ROMAJI, "Nieun");
		cv.put(BAHASA, "Nama");
		cv.put(V_HANGUL, "konsonan_nieun");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㄷ");
		cv.put(ROMAJI, "Digeut");
		cv.put(BAHASA, "Diam");
		cv.put(V_HANGUL, "konsonan_digeut");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㄹ");
		cv.put(ROMAJI, "Rieul");
		cv.put(BAHASA, "Ramai / Lapar");
		cv.put(V_HANGUL, "konsonan_rieul");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㅁ");
		cv.put(ROMAJI, "Mieum");
		cv.put(BAHASA, "Melati");
		cv.put(V_HANGUL, "konsonan_mieum");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㅂ");
		cv.put(ROMAJI, "Biup");
		cv.put(BAHASA, "Bapak / Pepaya");
		cv.put(V_HANGUL, "konsonan_biup");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㅅ");
		cv.put(ROMAJI, "Siot");
		cv.put(BAHASA, "Super");
		cv.put(V_HANGUL, "konsonan_siot");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㅇ");
		cv.put(ROMAJI, "Ieung");
		cv.put(BAHASA, " -ng");
		cv.put(V_HANGUL, "konsonan_ieung");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㅈ");
		cv.put(ROMAJI, "Jieut");
		cv.put(BAHASA, "Jarum");
		cv.put(V_HANGUL, "konsonan_jieut");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㅊ");
		cv.put(ROMAJI, "Chieut");
		cv.put(BAHASA, "Cinta");
		cv.put(V_HANGUL, "konsonan_chieut");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㅋ");
		cv.put(ROMAJI, "Khiuk");
		cv.put(BAHASA, "Khatib");
		cv.put(V_HANGUL, "konsonan_khiuk");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㅌ");
		cv.put(ROMAJI, "Thieut");
		cv.put(BAHASA, "Tali");
		cv.put(V_HANGUL, "konsonan_thiut");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㅍ");
		cv.put(ROMAJI, "Phieup");
		cv.put(BAHASA, "Perahu");
		cv.put(V_HANGUL, "konsonan_phieup");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㅎ");
		cv.put(ROMAJI, "Hieut");
		cv.put(BAHASA, "Hujan");
		cv.put(V_HANGUL, "konsonan_hieut");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㄲ");
		cv.put(ROMAJI, "Ssang Giuk");
		cv.put(BAHASA, "Kelapa");
		cv.put(V_HANGUL, "konsonan_ssang_giuk");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㄸ");
		cv.put(ROMAJI, "Ssang Digeut");
		cv.put(BAHASA, "Tali");
		cv.put(V_HANGUL, "konsonan_ssang_digeut");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㅃ");
		cv.put(ROMAJI, "Ssang Biup");
		cv.put(BAHASA, "Panik");
		cv.put(V_HANGUL, "konsonan_ssang_biup");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㅆ");
		cv.put(ROMAJI, "Ssang Siot");
		cv.put(BAHASA, "Salam");
		cv.put(V_HANGUL, "konsonan_ssang_siot");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
		
		cv.put(HANGUL, "ㅉ");
		cv.put(ROMAJI, "Ssang Jieut");
		cv.put(BAHASA, "Cacing");
		cv.put(V_HANGUL, "konsonan_ssang_jieut");
		db.insert("HURUF_KONSONAN", HANGUL, cv);
	}
	
	public void generateData(SQLiteDatabase db) {
		ContentValues cv = new ContentValues();
		cv.put(ANGKA, "1");
		cv.put(HANGUL, "알");
		cv.put(ROMAJI, "Il");
		cv.put(V_HANGUL, "sino_1");
		db.insert("ANGKA_SINO", ANGKA, cv);	
		
		cv.put(ANGKA, "2");
		cv.put(HANGUL, "이");
		cv.put(ROMAJI, "I");
		cv.put(V_HANGUL, "sino_2");
		db.insert("ANGKA_SINO", ANGKA, cv);	
		
		cv.put(ANGKA, "3");
		cv.put(HANGUL, "삼");
		cv.put(ROMAJI, "Sam");
		cv.put(V_HANGUL, "sino_3");
		db.insert("ANGKA_SINO", ANGKA, cv);	
		
		cv.put(ANGKA, "4");
		cv.put(HANGUL, "사");
		cv.put(ROMAJI, "Sa");
		cv.put(V_HANGUL, "sino_4");
		db.insert("ANGKA_SINO", ANGKA, cv);		
		
		cv.put(ANGKA, "5");
		cv.put(HANGUL, "오");
		cv.put(ROMAJI, "O");
		cv.put(V_HANGUL, "sino_5");
		db.insert("ANGKA_SINO", ANGKA, cv);		
		
		cv.put(ANGKA, "6");
		cv.put(HANGUL, "육");
		cv.put(ROMAJI, "Yuk");
		cv.put(V_HANGUL, "sino_6");
		db.insert("ANGKA_SINO", ANGKA, cv);		
		
		cv.put(ANGKA, "7");
		cv.put(HANGUL, "칠");
		cv.put(ROMAJI, "Chil");
		cv.put(V_HANGUL, "sino_7");
		db.insert("ANGKA_SINO", ANGKA, cv);	
		
		cv.put(ANGKA, "8");
		cv.put(HANGUL, "팔");
		cv.put(ROMAJI, "Phal");
		cv.put(V_HANGUL, "sino_8");
		db.insert("ANGKA_SINO", ANGKA, cv);	
		
		cv.put(ANGKA, "9");
		cv.put(HANGUL, "구");
		cv.put(ROMAJI, "Gu");
		cv.put(V_HANGUL, "sino_9");
		db.insert("ANGKA_SINO", ANGKA, cv);		
		
		cv.put(ANGKA, "10");
		cv.put(HANGUL, "십");
		cv.put(ROMAJI, "Sip");
		cv.put(V_HANGUL, "sino_10");
		db.insert("ANGKA_SINO", ANGKA, cv);		
		
		cv.put(ANGKA, "11");
		cv.put(HANGUL, "십 일");
		cv.put(ROMAJI, "Sip Il");
		cv.put(V_HANGUL, "sino_11");
		db.insert("ANGKA_SINO", ANGKA, cv);		
		
		cv.put(ANGKA, "16");
		cv.put(HANGUL, "십 육");
		cv.put(ROMAJI, "Sip Yuk");
		cv.put(V_HANGUL, "sino_16");
		db.insert("ANGKA_SINO", ANGKA, cv);	
		
		cv.put(ANGKA, "20");
		cv.put(HANGUL, "이십");
		cv.put(ROMAJI, "I Sip");
		cv.put(V_HANGUL, "sino_20");
		db.insert("ANGKA_SINO", ANGKA, cv);		
			
		cv.put(ANGKA, "100");
		cv.put(HANGUL, "백");
		cv.put(ROMAJI, "Baek");
		cv.put(V_HANGUL, "sino_100");
		db.insert("ANGKA_SINO", ANGKA, cv);	
			
		cv.put(ANGKA, "1000");
		cv.put(HANGUL, "천");
		cv.put(ROMAJI, "Choun");
		cv.put(V_HANGUL, "sino_1000");
		db.insert("ANGKA_SINO", ANGKA, cv);	
		
		cv.put(ANGKA, "10000");
		cv.put(HANGUL, "만");
		cv.put(ROMAJI, "Man");
		cv.put(V_HANGUL, "sino_10000");
		db.insert("ANGKA_SINO", ANGKA, cv);		
	}
	
	public void generateDataAngkaAsli(SQLiteDatabase db) {
		ContentValues cv = new ContentValues();
		cv.put(ANGKA, "1");
		cv.put(HANGUL, "하나");
		cv.put(ROMAJI, "Hana");
		cv.put(V_HANGUL, "asli_1");
		db.insert("ANGKA_ASLI", ANGKA, cv);	
		
		cv.put(ANGKA, "2");
		cv.put(HANGUL, "둘");
		cv.put(ROMAJI, "Dul");
		cv.put(V_HANGUL, "asli_2");
		db.insert("ANGKA_ASLI", ANGKA, cv);	
		
		cv.put(ANGKA, "3");
		cv.put(HANGUL, "셋");
		cv.put(ROMAJI, "Set");
		cv.put(V_HANGUL, "asli_3");
		db.insert("ANGKA_ASLI", ANGKA, cv);	
		
		cv.put(ANGKA, "4");
		cv.put(HANGUL, "넷");
		cv.put(ROMAJI, "Net");
		cv.put(V_HANGUL, "asli_4");
		db.insert("ANGKA_ASLI", ANGKA, cv);		
		
		cv.put(ANGKA, "5");
		cv.put(HANGUL, "다섯");
		cv.put(ROMAJI, "Dasout");
		cv.put(V_HANGUL, "asli_5");
		db.insert("ANGKA_ASLI", ANGKA, cv);		
		
		cv.put(ANGKA, "6");
		cv.put(HANGUL, "여섯");
		cv.put(ROMAJI, "Yousout");
		cv.put(V_HANGUL, "asli_6");
		db.insert("ANGKA_ASLI", ANGKA, cv);		
		
		cv.put(ANGKA, "7");
		cv.put(HANGUL, "일곱");
		cv.put(ROMAJI, "Ilgop");
		cv.put(V_HANGUL, "asli_7");
		db.insert("ANGKA_ASLI", ANGKA, cv);	
		
		cv.put(ANGKA, "8");
		cv.put(HANGUL, "여덜");
		cv.put(ROMAJI, "Yodol");
		cv.put(V_HANGUL, "asli_8");
		db.insert("ANGKA_ASLI", ANGKA, cv);	
		
		cv.put(ANGKA, "9");
		cv.put(HANGUL, "아홉");
		cv.put(ROMAJI, "Ahop");
		cv.put(V_HANGUL, "asli_9");
		db.insert("ANGKA_ASLI", ANGKA, cv);		
		
		cv.put(ANGKA, "10");
		cv.put(HANGUL, "열");
		cv.put(ROMAJI, "Yol");
		cv.put(V_HANGUL, "asli_10");
		db.insert("ANGKA_ASLI", ANGKA, cv);		
		
		cv.put(ANGKA, "11");
		cv.put(HANGUL, "열하나");
		cv.put(ROMAJI, "Yol Hana");
		cv.put(V_HANGUL, "asli_11");
		db.insert("ANGKA_ASLI", ANGKA, cv);		
		
		cv.put(ANGKA, "20");
		cv.put(HANGUL, "스믈");
		cv.put(ROMAJI, "Seumul");
		cv.put(V_HANGUL, "asli_20");
		db.insert("ANGKA_ASLI", ANGKA, cv);		
		
		cv.put(ANGKA, "30");
		cv.put(HANGUL, "소른");
		cv.put(ROMAJI, "Soreun");
		cv.put(V_HANGUL, "asli_30");
		db.insert("ANGKA_ASLI", ANGKA, cv);	
		
		cv.put(ANGKA, "40");
		cv.put(HANGUL, "마흔");
		cv.put(ROMAJI, "Maheun");
		cv.put(V_HANGUL, "asli_40");
		db.insert("ANGKA_ASLI", ANGKA, cv);	
		
		cv.put(ANGKA, "50");
		cv.put(HANGUL, "쉰");
		cv.put(ROMAJI, "Swin");
		cv.put(V_HANGUL, "asli_50");
		db.insert("ANGKA_ASLI", ANGKA, cv);		
		
		cv.put(ANGKA, "60");
		cv.put(HANGUL, "예순");
		cv.put(ROMAJI, "Yesun");
		cv.put(V_HANGUL, "asli_60");
		db.insert("ANGKA_ASLI", ANGKA, cv);		
		
		cv.put(ANGKA, "70");
		cv.put(HANGUL, "일흔");
		cv.put(ROMAJI, "Ilheun");
		cv.put(V_HANGUL, "asli_70");
		db.insert("ANGKA_ASLI", ANGKA, cv);		
		
		cv.put(ANGKA, "80");
		cv.put(HANGUL, "여든");
		cv.put(ROMAJI, "Youdeun");
		cv.put(V_HANGUL, "asli_80");
		db.insert("ANGKA_ASLI", ANGKA, cv);	
		
		cv.put(ANGKA, "90");
		cv.put(HANGUL, "아흔");
		cv.put(ROMAJI, "Aheun");
		cv.put(V_HANGUL, "asli_90");
		db.insert("ANGKA_ASLI", ANGKA, cv);		
		
		cv.put(ANGKA, "100");
		cv.put(HANGUL, "백");
		cv.put(ROMAJI, "Baek");
		cv.put(V_HANGUL, "asli_100");
		db.insert("ANGKA_ASLI", ANGKA, cv);
	}
	
	//mengisikan 
	public void generateDataPerkenalan(SQLiteDatabase db) {
		ContentValues cv = new ContentValues();
		cv.put(BAHASA, "Hallo / Selamat Pagi/Siang/Sore/Malam ");
		cv.put(HANGUL, "안녕하세요");
		cv.put(ROMAJI, "Anyounghaseyo");
		cv.put(V_HANGUL, "pk1");
		db.insert("PERKENALAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Nama saya Budi");
		cv.put(HANGUL, "제이름은 부디 입니다");
		cv.put(ROMAJI, "Je ireumeun Budi imnida");
		cv.put(V_HANGUL, "pk2");
		db.insert("PERKENALAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Saya dari Indonesia");
		cv.put(HANGUL, "인도네시아에서왔습니다");
		cv.put(ROMAJI, "Indonesiaeso watseumnida");
		cv.put(V_HANGUL, "pk3");
		db.insert("PERKENALAN", BAHASA, cv);
		
		cv.put(BAHASA, "Umur saya 22 Tahun");
		cv.put(HANGUL, "네나이는 스물두살입니다");
		cv.put(ROMAJI, "Ne naineun seumuldulsal imnida");
		cv.put(V_HANGUL, "pk4");
		db.insert("PERKENALAN", BAHASA, cv);
		
		cv.put(BAHASA, "Saya adalah mahasiswa tingkat dua.");
		cv.put(HANGUL, "저는 대학교 이 하년 입냐다");
		cv.put(ROMAJI, "Joneun daehakyo i haknyeon imnida.");
		cv.put(V_HANGUL, "pk5");
		db.insert("PERKENALAN", BAHASA, cv);
		
		cv.put(BAHASA, "Ayah saya adalah seorang karyawan swasta. Dan Ibu saya adalah seorang ibu rumah tangga.");
		cv.put(HANGUL, "제 아버지는 개인 직원이 입니다. 그리고 제 어머니는 가장 주부이십니다.");
		cv.put(ROMAJI, "Je abojineun gaein jikwoni ibnida. Geurigo je omonineun kajang jubuisimnida.");
		cv.put(V_HANGUL, "pk6");
		db.insert("PERKENALAN", BAHASA, cv);
		
		cv.put(BAHASA, "Saya anak kedua.");
		cv.put(HANGUL, "저는 한번째 입니다");
		cv.put(ROMAJI, "Jouneun hanbonjae imnida.");
		cv.put(V_HANGUL, "pk7");
		db.insert("PERKENALAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Saya memiliki satu orang kakak perempuan dan satu orang adik laki-laki.");
		cv.put(HANGUL, "저는 누나가 하명,  그리고 남동생이 하나 있습니다.");
		cv.put(ROMAJI, "Jouneun nunaga hamyoung, geurigo namdongsaengi hana itseumnida.");
		cv.put(V_HANGUL, "pk8");
		db.insert("PERKENALAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Terimakasih. Senang berkenalan dengan kalian semua.");
		cv.put(HANGUL, "감사합니다. 만나서 반갑습니다");
		cv.put(ROMAJI, "Kamsahamnuda. Mannaso bangapsemnida.");
		cv.put(V_HANGUL, "pk9");
		db.insert("PERKENALAN", BAHASA, cv);	
	}
	
	public void generateDataPertemuanPertama(SQLiteDatabase db) {
		ContentValues cv = new ContentValues();
		cv.put(BAHASA, "Selamat Pagi. ");
		cv.put(HANGUL, "안녕하세요");
		cv.put(ROMAJI, "Anyounghaseyo");
		cv.put(V_HANGUL, "ppt_1");
		db.insert("PERTEMUAN_PERTAMA", BAHASA, cv);	
		
		cv.put(BAHASA, "Selamat pagi, ini pertama kalinya kita bertemu ");
		cv.put(HANGUL, "안녕하세요. 처음뵙겠습니다");
		cv.put(ROMAJI, "Annyounghaseyo. Choueum bwepketseumnida");
		cv.put(V_HANGUL, "ppt_2");
		db.insert("PERTEMUAN_PERTAMA", BAHASA, cv);	
		
		cv.put(BAHASA, "Ya, senang bertemu dengan anda ");
		cv.put(HANGUL, "네, 만나서 만갑습니다");
		cv.put(ROMAJI, "Ne, mannaso bangapseumnida");
		cv.put(V_HANGUL, "ppt_3");
		db.insert("PERTEMUAN_PERTAMA", BAHASA, cv);	
		
		cv.put(BAHASA, "Nama saya Rangga. Datang dari Indonesia. Saya datang ke Korea untuk berwisata dan akan disini selama dua minggu. Mohon bantunnya. ");
		cv.put(HANGUL, "제 이름은 랑가입니다. 이도네시아에서 왔습니다. 저는한국에여행하러 왔고 이주일즘 있겠슴니다. 잘부탁드림니다");
		cv.put(ROMAJI, "Je ireumeun Rangga-imnida. Indonesiaeso watseumnida. Joneun hangukeyouhaengharou wattago ijuiljoungdo ittkesseumnida. Jhalbuthakdeurimnida");
		cv.put(V_HANGUL, "ppt_4");
		db.insert("PERTEMUAN_PERTAMA", BAHASA, cv);	
		
		cv.put(BAHASA, "Ya, baiklah. Saya Min-Woo saya akan membantu kamu selama berada di Korea. ");
		cv.put(HANGUL, "네, 알겠슴니다. 저는 민우라고합니다. 한국에 있는 동안 도와드리겠습니다");
		cv.put(ROMAJI, "Ne, alketseumnida. Jouneun Min Woo ragohamnida. Hangkuke issneun dongan dowadeurikettseumnida");
		cv.put(V_HANGUL, "ppt_5");
		db.insert("PERTEMUAN_PERTAMA", BAHASA, cv);	
		
		cv.put(BAHASA, "Terimakasih atas bantuannya. Saya mau istirahat dulu. Sampai jumpa besok ");
		cv.put(HANGUL, "도와주셔서 고맙습니다.  저는 먼저 쉬겠습니다. 내일봅시다");
		cv.put(ROMAJI, "Dowajusyousou gomapseumnida. Jouneun mounjou swiketseumnida. Naeil bopsida");
		cv.put(V_HANGUL, "ppt_6");
		db.insert("PERTEMUAN_PERTAMA", BAHASA, cv);	
		
		cv.put(BAHASA, "Sama-sama. Selamat istirahat. Sampai jumpa besok ");
		cv.put(HANGUL, "천만에요. 안녕히주무십시오. 내일 봅시다");
		cv.put(ROMAJI, "Chonmaneyo. Annyounghijumusipsio. Naeil bopsida.");
		cv.put(V_HANGUL, "ppt_7");
		db.insert("PERTEMUAN_PERTAMA", BAHASA, cv);	
		
	}

	public void generateDataPerpisahan(SQLiteDatabase db) {
		ContentValues cv = new ContentValues();
		cv.put(BAHASA, "Selamat Siang.");
		cv.put(HANGUL, "안녕하세요");
		cv.put(ROMAJI, "Anyounghaseyo");
		cv.put(V_HANGUL, "pps_1");
		db.insert("PERPISAHAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Selamat siang. Maaf saya terlambat.");
		cv.put(HANGUL, "안녕하세여. 늦어서 미안해요.");
		cv.put(ROMAJI, "Annyounghaseyo. Neujousou mianhaeyo.");
		cv.put(V_HANGUL, "pps_2");
		db.insert("PERPISAHAN", BAHASA, cv);
		
		cv.put(BAHASA, "Tidak apa-apa, saya juga baru tiba. ");
		cv.put(HANGUL, "궨차나요, 저도 방금 왔어요");
		cv.put(ROMAJI, "Gwenchanayo. Joudo banggem owassouyo.");
		cv.put(V_HANGUL, "pps_3");
		db.insert("PERPISAHAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Besok saya akan kembali ke Indonesia.");
		cv.put(HANGUL, "저는 내일 인도네시아로 돌아갈거예요.");
		cv.put(ROMAJI, "Jouneun naeil Indonesiaro dolakal kouyeyo");
		cv.put(V_HANGUL, "pps_4");
		db.insert("PERPISAHAN", BAHASA, cv);
		
		cv.put(BAHASA, "Sayang sekali. Bagaimana Korea?");
		cv.put(HANGUL, "정말 아쉽네요. 한국이 어때나요?");
		cv.put(ROMAJI, "Joungmal aswimneyo. Hangguki ottaeyo?");
		cv.put(V_HANGUL, "pps_5");
		db.insert("PERPISAHAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Saya senang sekali. Saya disini mendapat pengalaan baru. Dan saya suka makanan Korea.");
		cv.put(HANGUL, "저는 매우 즐거웠어요. 저는 여기에서 사로운 경험을 많이했어요. 그리고 한국 음식도 매우 좋아졌어요.");
		cv.put(ROMAJI, "Jouneun maeu jeulgowossoyo. Jouneun yougiesousaroun gyounghoumeul mani haessouyo. Geurigo hanguk sikdo maeu joajyoussouyo.");
		cv.put(V_HANGUL, "pps_6");
		db.insert("PERPISAHAN", BAHASA, cv);
		
		cv.put(BAHASA, "Syukurlah. Besok pulangnya hari-hati ya. Sampai jumpa lagi.");
		cv.put(HANGUL, "다행이예요. 내일 조심해서 가세요. 또봐요.");
		cv.put(ROMAJI, "Dahaengiyeyo. Naeil josimhaeso kaseyo. Tto bwayo.");
		cv.put(V_HANGUL, "pps_7");
		db.insert("PERPISAHAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Ya, sampai bertemu kembali. Selamat tinggal.");
		cv.put(HANGUL, "네, 또 만나요. 안녕히 계세요.");
		cv.put(ROMAJI, "   Ne, tto mannayo. Annyounghi Gyeseyo");
		cv.put(V_HANGUL, "pps_8");
		db.insert("PERPISAHAN", BAHASA, cv);
		
		cv.put(BAHASA, "Selamat jalan.");
		cv.put(HANGUL, "안녕히 가세요");
		cv.put(ROMAJI, "Anyounghigaseyo.");
		cv.put(V_HANGUL, "pps_9");
		db.insert("PERPISAHAN", BAHASA, cv);
	
	}
	
	public void generateDataPenerbangan(SQLiteDatabase db) {
		ContentValues cv = new ContentValues();
		cv.put(BAHASA, "Selamat siang. Sebelum tiba di Korea anda harus mengisi formulir ini.");
		cv.put(HANGUL, "안녕 하세요. 한국에 두착하기 전에 이 용지를 작성해야해요");
		cv.put(ROMAJI, "Annyounghaseyo. Hangguke dochakhagi joune i yongjireul jakseonghaeyahaeyo");
		cv.put(V_HANGUL, "ps1");
		db.insert("PENERBANGAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Apa saya harus isi semuanya?");
		cv.put(HANGUL, "다 작성해야돼요?");
		cv.put(ROMAJI, "Da jaksounghae yadwaeyo?");
		cv.put(V_HANGUL, "ps2");
		db.insert("PENERBANGAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Ya, harus semuanya. Yang putih adalah formulir bea cukai, dan yang kuning adalah catatan kesehatan. Lalu yang merah harus diberikan kepada imigrasi");
		cv.put(HANGUL, "네 다 작성해돼요. 하얀용지가 세관 신고서이고, 노란용지가 건강기록이예요. 그대음네 빨간용지는 이민국에 줘야해요");
		cv.put(ROMAJI, "Ne, da jaksounghaedwaeyo. Hayanyongjiga segwan singosouigo, noranyongjiga gounganggirokiyeyo. Geudaeeume ppalganyongjineun iminguke jwoyahaeyo");
		cv.put(V_HANGUL, "ps3");
		db.insert("PENERBANGAN", BAHASA, cv);
		
		cv.put(BAHASA, "Baiklah, kira-kira berapa lama lagi kita tiba di Korea?");
		cv.put(HANGUL, "네 알겠어요. 한국에 도착할때까지 대략 얼마나 걸려요?");
		cv.put(ROMAJI, "Ne akessouyo. Hanguke dochakalttaekkaji daeryak olmana gourryouyo?");
		cv.put(V_HANGUL, "ps4");
		db.insert("PENERBANGAN", BAHASA, cv);
		
		cv.put(BAHASA, "Kira-kira dua jam lagi kita akan tiba di Korea");
		cv.put(HANGUL, "대략 두시간후에 한국에 도착할거예요");
		cv.put(ROMAJI, "Daeryak dusiganhue hanguke dochakhalgouyeyo");
		cv.put(V_HANGUL, "ps5");
		db.insert("PENERBANGAN", BAHASA, cv);
		
		cv.put(BAHASA, "Terimakasih");
		cv.put(HANGUL, "감사합니다");
		cv.put(ROMAJI, "Kamsahamnida");
		cv.put(V_HANGUL, "ps6");
		db.insert("PENERBANGAN", BAHASA, cv);
		
	}
	
	public void generateDataTerminalKedatangan(SQLiteDatabase db) {
		ContentValues cv = new ContentValues();
		cv.put(BAHASA, "Selamat Siang. Bisa Lihat Pasportnya?");
		cv.put(HANGUL, " 안녕하세요. 여권을 볼수 있을까요?");
		cv.put(ROMAJI, "Annyounghaseyo. Yougwaneul bolsu isseulkkayo?");
		cv.put(V_HANGUL, "tk_1");
		db.insert("TERMINAL_KEDATANGAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Selamat siang. Ya, tentu saja.");
		cv.put(HANGUL, "안녕하세요. 네, 당연하지요.");
		cv.put(ROMAJI, "Annyounghaseyo. Ne, dangyounhajiyo.");
		cv.put(V_HANGUL, "tk_2");
		db.insert("TERMINAL_KEDATANGAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Pertama kali datang ke Korea?");
		cv.put(HANGUL, "한국에 처음 왔어요?");
		cv.put(ROMAJI, "Hanguke choueum owassouyo?");
		cv.put(V_HANGUL, "tk_3");
		db.insert("TERMINAL_KEDATANGAN", BAHASA, cv);
	
		cv.put(BAHASA, "Ya.");
		cv.put(HANGUL, "네");
		cv.put(ROMAJI, "Ne.");
		cv.put(V_HANGUL, "tk_4");
		db.insert("TERMINAL_KEDATANGAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Kenapa datang ke Korea?");
		cv.put(HANGUL, "왜 한국에 왔어요?");
		cv.put(ROMAJI, "Wae hanguke owassouyo?");
		cv.put(V_HANGUL, "tk_5");
		db.insert("TERMINAL_KEDATANGAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Saya datang untuk berwisata.");
		cv.put(HANGUL, "저는 여행 왔어요.");
		cv.put(ROMAJI, "Jouneun youhaeng owassoyo.");
		cv.put(V_HANGUL, "tk_6");
		db.insert("TERMINAL_KEDATANGAN", BAHASA, cv);
	
		cv.put(BAHASA, "Berapa lama kamu akan ada di Korea?");
		cv.put(HANGUL, "얼마나 한국에 있을겨예요 ?");
		cv.put(ROMAJI, "Olmana hanguke isseulgyouyeyo?");
		cv.put(V_HANGUL, "tk_7");
		db.insert("TERMINAL_KEDATANGAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Sekitar dua minggu.");
		cv.put(HANGUL, "약 이주일예요.");
		cv.put(ROMAJI, "Yak iljuilyeyo.");
		cv.put(V_HANGUL, "tk_8");
		db.insert("TERMINAL_KEDATANGAN", BAHASA, cv);
	
		cv.put(BAHASA, "Dimana kamu akan tinggal selama di Korea?.");
		cv.put(HANGUL, "한국에 있는 동안 어디에서살아요?");
		cv.put(ROMAJI, "Hanguke isneun dongan oudiesou salayo?");
		cv.put(V_HANGUL, "tk_9");
		db.insert("TERMINAL_KEDATANGAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Saya akan tinggal di Hotel Lotte Seoul.");
		cv.put(HANGUL, "저는 서울 롯데 호텔에서 잘거예요.");
		cv.put(ROMAJI, "Jouneun Seoul Lotte Hotel esou jalkayeyo.");
		cv.put(V_HANGUL, "tk_10");
		db.insert("TERMINAL_KEDATANGAN", BAHASA, cv);
		
		cv.put(BAHASA, "Jangan lupa, visa kamun akan habis pada tanggal 2 Februari. Semoga harimu menyenangnyan.");
		cv.put(HANGUL, "비자가 이월 이일에 끝나는 것을 앚지마세요. 좋은 하루 보내세요.");
		cv.put(ROMAJI, "Bijaga iwol iile kkeutnaneun gouseul ajjimaseyo. Juheun haru bonaeseyo.");
		cv.put(V_HANGUL, "tk_11");
		db.insert("TERMINAL_KEDATANGAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Terimakasih.");
		cv.put(HANGUL, "감사합니다.");
		cv.put(ROMAJI, "Kamsahamnida.");
		cv.put(V_HANGUL, "tk_12");
		db.insert("TERMINAL_KEDATANGAN", BAHASA, cv);
	
	}
	
	public void generateDataHotel(SQLiteDatabase db) {
		ContentValues cv = new ContentValues();
		cv.put(BAHASA, "Selamat siang.");
		cv.put(HANGUL, "안녕하세요");
		cv.put(ROMAJI, "Annyounghaseyo");
		cv.put(V_HANGUL, "ht1");
		db.insert("HOTEL", BAHASA, cv);	
		
		cv.put(BAHASA, "Selamat datang, ada yang bisa saya bantu?");
		cv.put(HANGUL, "오신걸 환영합니다. 뭘 도와드릴카요?");
		cv.put(ROMAJI, "Annyounghaseyo. Mwoul dohwadeurilkayo?");
		cv.put(V_HANGUL, "ht2");
		db.insert("HOTEL", BAHASA, cv);	
		
		cv.put(BAHASA, "Ya, saya ingin memesan kamar.");
		cv.put(HANGUL, "네, 저는 방을 예약하고 싶어요.");
		cv.put(ROMAJI, "Ne, jouneun bangeul yeyakhago siphoyo.");
		cv.put(V_HANGUL, "ht3");
		db.insert("HOTEL", BAHASA, cv);	
		
		cv.put(BAHASA, "Apakah anda sudah memesan sebelumnya?");
		cv.put(HANGUL, "손님은 이미 예약했습니까?");
		cv.put(ROMAJI, "Sonnimeun imi yeyakhaetseumnikka?");
		cv.put(V_HANGUL, "ht4");
		db.insert("HOTEL", BAHASA, cv);	
		
		cv.put(BAHASA, "Tidak, saya belum memesan.");
		cv.put(HANGUL, "아니요, 아직 예약을 안했어요.");
		cv.put(ROMAJI, "Aniyo, ajik yeyakeul anhaessouyo.");
		cv.put(V_HANGUL, "ht5");
		db.insert("HOTEL", BAHASA, cv);	
		
		cv.put(BAHASA, "Anda ingin kamar tipe apa?");
		cv.put(HANGUL, "손님은 어떤 방을 원하심니까?");
		cv.put(ROMAJI, "Sonnimeun outtoun bangeul wonhasimnikka?");
		cv.put(V_HANGUL, "ht6");
		db.insert("HOTEL", BAHASA, cv);	
		
		cv.put(BAHASA, "Saya ingin tipe single.");
		cv.put(HANGUL, "저는 싱글타입을 원해요.");
		cv.put(ROMAJI, "Joneun singgeul taipeul wonhaeyo.");
		cv.put(V_HANGUL, "ht7");
		db.insert("HOTEL", BAHASA, cv);	
		
		cv.put(BAHASA, "Baiklah, anda akan menginap berapa hari?");
		cv.put(HANGUL, "알겠습니다. 며칠 동안 계실더십니까?");
		cv.put(ROMAJI, "Alketseumnida. Myouchil dongan kyesildosimnikka?");
		cv.put(V_HANGUL, "ht8");
		db.insert("HOTEL", BAHASA, cv);	
		
		cv.put(BAHASA, "Saya akan menginap selama dua minggu.");
		cv.put(HANGUL, "저는 이틀 동안 있을거예요.");
		cv.put(ROMAJI, "Jouneun iteul dongan  isseul kaoyeyo.");
		cv.put(V_HANGUL, "ht9");
		db.insert("HOTEL", BAHASA, cv);	
		
		cv.put(BAHASA, "Ini kunci kamanya. Kamar nomor 206 di lantai 13.");
		cv.put(HANGUL, "이갓은 방의 열쇠입니다. 방은 시삼 층의 이백육호 입니다.");
		cv.put(ROMAJI, "Igoseun bangeun youlswi imnida. Bangeun sisamcheungui ibaekyukho imnida.");
		cv.put(V_HANGUL, "ht10");
		db.insert("HOTEL", BAHASA, cv);	
		
		cv.put(BAHASA, "Terimakasih.");
		cv.put(HANGUL, "감사합니다");
		cv.put(ROMAJI, "Kamsahamnida.");
		cv.put(V_HANGUL, "ht11");
		db.insert("HOTEL", BAHASA, cv);	
		
		cv.put(BAHASA, "Selamat beristirahat, Pak.");
		cv.put(HANGUL, "편히 쉬십시오, 손님.");
		cv.put(ROMAJI, "Pyounhi swisipsio, sonnim.");
		cv.put(V_HANGUL, "ht12");
		db.insert("HOTEL", BAHASA, cv);	
		
	}	
	
	public void generateDataJalan(SQLiteDatabase db) {
		ContentValues cv = new ContentValues();
		cv.put(BAHASA, "Permisi, kami dari Indonesia. Kami tidak tahu jalan,jadi kami mau bertanya.");
		cv.put(HANGUL, "실례합니다, 저희는 안도네시아에서 왔습니다. 갈을 물어보고싶어요.");
		cv.put(ROMAJI, "Sillyehamnida, joheunineun indonesiaeso owatseumnida. Gireul murobogo siphoyo.");
		cv.put(V_HANGUL, "jl1");
		db.insert("JALAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Ya, silahkan!");
		cv.put(HANGUL, "네, 물어버세요!");
		cv.put(ROMAJI, "Ne, muloboseyo!");
		cv.put(V_HANGUL, "jl2");
		db.insert("JALAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Terimakasih. Ini dimana ya? Kami bermaksud pergi ke balai kota Seoul.");
		cv.put(HANGUL, "감사합니다. 여기가 어디예요? 우리는 서울 시천에 가랴고 해요.");
		cv.put(ROMAJI, "Kamsahamnida. Yougiga oudieyo? Urineun seoul sichoune karyougo haeyo.");
		cv.put(V_HANGUL, "jl3");
		db.insert("JALAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Tempat ini namanya Myeoungdong. Disini pusat berbelanja. Balai Kota Seoul dari sini sedikit jauh.");
		cv.put(HANGUL, "이장소의 이름이 명동이에요. 여기는 쇼핑 센테예요. 서울 시천은 여기에서 저금 멀어요.");
		cv.put(ROMAJI, "Ijangsoeui ireumi myoungdongieyo. Yougineun syophing senteyeyo. Seoul sichouneun yougiesou cougeum moulouyo.");
		cv.put(V_HANGUL, "jl4");
		db.insert("JALAN", BAHASA, cv);		
		
		cv.put(BAHASA, "Oh, kalau begitu bagaimana pergi kesana?");
		cv.put(HANGUL, "어, 그럼 조근그 곳으로 어떻게 가야돼요?");
		cv.put(ROMAJI, "O, geuroum geugoseuro outtouke kayadwaeyo?");
		cv.put(V_HANGUL, "jl5");
		db.insert("JALAN", BAHASA, cv);		
		
		cv.put(BAHASA, "Bisa naik kereta bawah tanah atau taksi, tapi jalan kaki juga bisa. Kalau jalan kaki, kira-kira 30 menit.");
		cv.put(HANGUL, "지하철이나 택시를 탈수 있지만 걸어가도 돼요. 걸어가면은 삼십분쯤 갈려요.");
		cv.put(ROMAJI, "Jihachoulina taeksireul talsu itjiman gouroukado dwaeyo. Gourokamyouneun samsip bun jjeum gollyouyo.");
		cv.put(V_HANGUL, "jl6");
		db.insert("JALAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Hari ini cuacanya bagus. Kami sepertinya akan jalan kaki kesana. Apa ada tempat lain yang menarik?");
		cv.put(HANGUL, "오늘 날씨가 좋네요. 우리는 그곳으로 걸어갈  게요.다른 재미았는 장소가 있나요?");
		cv.put(ROMAJI, "Oneul nalssiga johneyo. Urineun geugoseuro gourogal keyo. Dareun jaemisneun jangsoga isnayo?");
		cv.put(V_HANGUL, "jl7");
		db.insert("JALAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Tentu saja. Anda silahkan pergi ke Cheonggyecheon atau Gwanghwamun. Tempat itu sangat indah.");
		cv.put(HANGUL, "물론이지요. 청계천이나 광화문에 가보세요. 그장 소는 아주 아름아워요.");
		cv.put(ROMAJI, "Mollenijiyo. Cheonggyoucheonina gwanghwamune kaboseyo. Geujangsoneun aju areumawouyo.");
		cv.put(V_HANGUL, "jl8");
		db.insert("JALAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Baiklah, termakasih atas bantuanya.");
		cv.put(HANGUL, "알겠습니다, 도와줘서 고마워요");
		cv.put(ROMAJI, "Alkeutseumnida. Dowajwosou gomawoyo.");
		cv.put(V_HANGUL, "jl9");
		db.insert("JALAN", BAHASA, cv);	
		
		cv.put(BAHASA, "Semoga mendapat hari yang baik.");
		cv.put(HANGUL, "좋은 하루 보내세요");
		cv.put(ROMAJI, "Joheum haru bonaeseyo.");
		cv.put(V_HANGUL, "jl10");
		db.insert("JALAN", BAHASA, cv);	

	}		
	
	//kosakata here
	public void generateDataKosakata(SQLiteDatabase db) {
		ContentValues cv = new ContentValues();
		//START kosa kata perkenalan
		cv.put(KEY_ID, "a1");
		cv.put(BAHASA, "Nama");
		cv.put(HANGUL, "이름이");
		cv.put(ROMAJI, "Ireumi");
		cv.put(V_HANGUL, "kpk1");
		cv.put(GRUP, "a");
		db.insert("KOSAKATA", KEY_ID, cv);	
		
		cv.put(KEY_ID, "a2");
		cv.put(BAHASA, "Umur");
		cv.put(HANGUL, "나이는");
		cv.put(ROMAJI, "Naineun");
		cv.put(V_HANGUL, "kpk2");
		cv.put(GRUP, "a");
		db.insert("KOSAKATA", KEY_ID, cv);	
		
		cv.put(KEY_ID, "a3");
		cv.put(BAHASA, "Mahasiswa");
		cv.put(HANGUL, "대학겨");
		cv.put(ROMAJI, "Daehakyo");
		cv.put(V_HANGUL, "kpk3");
		cv.put(GRUP, "a");
		db.insert("KOSAKATA", KEY_ID, cv);	
		
		cv.put(KEY_ID, "a4");
		cv.put(BAHASA, "Ayah");
		cv.put(HANGUL, "아보지");
		cv.put(ROMAJI, "Aboji");
		cv.put(V_HANGUL, "kpk4");
		cv.put(GRUP, "a");
		db.insert("KOSAKATA", KEY_ID, cv);	
		
		cv.put(KEY_ID, "a5");
		cv.put(BAHASA, "Ibu");
		cv.put(HANGUL, "어머니");
		cv.put(ROMAJI, "Omoni");
		cv.put(V_HANGUL, "kpk5");
		cv.put(GRUP, "a");
		db.insert("KOSAKATA", KEY_ID, cv);	
		
		cv.put(KEY_ID, "a6");
		cv.put(BAHASA, "Kakak Perempuan");
		cv.put(HANGUL, "누나 / 앤니");
		cv.put(ROMAJI, "Nuna / Oenni");
		cv.put(V_HANGUL, "kpk6");
		cv.put(GRUP, "a");
		db.insert("KOSAKATA", KEY_ID, cv);	
		
		cv.put(KEY_ID, "a7");
		cv.put(BAHASA, "Kakak Laki-Laki");
		cv.put(HANGUL, "형 / 오빠");
		cv.put(ROMAJI, "Hyoung / Oppa");
		cv.put(V_HANGUL, "kpk8");
		cv.put(GRUP, "a");
		db.insert("KOSAKATA", KEY_ID, cv);	
	
		cv.put(KEY_ID, "a8");
		cv.put(BAHASA, "Adik Laki-Laki");
		cv.put(HANGUL, "남동생");
		cv.put(ROMAJI, "Namdongsaeng");
		cv.put(V_HANGUL, "kpk10");
		cv.put(GRUP, "a");
		db.insert("KOSAKATA", KEY_ID, cv);	
	
		cv.put(KEY_ID, "a9");
		cv.put(BAHASA, "Adik Perempuan");
		cv.put(HANGUL, "여동생");
		cv.put(ROMAJI, "Yodongsaeng");
		cv.put(V_HANGUL, "kpk11");
		cv.put(GRUP, "a");
		db.insert("KOSAKATA", KEY_ID, cv);	
		//END kosakata perkenalan
		
		//START kosakata pertemuan pertama
		cv.put(KEY_ID, "b1");
		cv.put(BAHASA, "Selamat Pagi");
		cv.put(HANGUL, "안녕하세요");
		cv.put(ROMAJI, "Annyounghaseo");
		cv.put(V_HANGUL, "kpt1");
		cv.put(GRUP, "b");
		db.insert("KOSAKATA", KEY_ID, cv);	
		
		cv.put(KEY_ID, "b2");
		cv.put(BAHASA, "Mohon Bantuan");
		cv.put(HANGUL, "잘부탁드림니다");
		cv.put(ROMAJI, "Jal Buthak Deurimnida");
		cv.put(V_HANGUL, "kpt2");
		cv.put(GRUP, "b");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "b3");
		cv.put(BAHASA, "Terima Kasih");
		cv.put(HANGUL, "고맙습니다");
		cv.put(ROMAJI, "Gomapseumnida");
		cv.put(V_HANGUL, "kpt3");
		cv.put(GRUP, "b");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "b4");
		cv.put(BAHASA, "Terima Kasih Kembali");
		cv.put(HANGUL, "천만에요");
		cv.put(ROMAJI, "Chonmaneyo");
		cv.put(V_HANGUL, "kpt4");
		cv.put(GRUP, "b");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "b5");
		cv.put(BAHASA, "Selamat Istirahat");
		cv.put(HANGUL, "안녕히주무십시요");
		cv.put(ROMAJI, "Annyounghi jumusipsio");
		cv.put(V_HANGUL, "kpt5");
		cv.put(GRUP, "b");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "b6");
		cv.put(BAHASA, "Sampai jumpa besok");
		cv.put(HANGUL, "내일 봅시다");
		cv.put(ROMAJI, "Naeil bopsida");
		cv.put(V_HANGUL, "kpt6");
		cv.put(GRUP, "b");
		db.insert("KOSAKATA", KEY_ID, cv);
		//END kosakata pertemuan pertama
		
		//START kosakata Perpisahan
		cv.put(KEY_ID, "c1");
		cv.put(BAHASA, "Mohon maaf");
		cv.put(HANGUL, "미안합니다");
		cv.put(ROMAJI, "Mianhamnida");
		cv.put(V_HANGUL, "kpr1");
		cv.put(GRUP, "c");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "c2");
		cv.put(BAHASA, "Tidak apa-apa");
		cv.put(HANGUL, "궨차나요");
		cv.put(ROMAJI, "Gwenchanayo");
		cv.put(V_HANGUL, "kpr2");
		cv.put(GRUP, "c");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "c3");
		cv.put(BAHASA, "Pulang");
		cv.put(HANGUL, "돌아가다");
		cv.put(ROMAJI, "Dolagada");
		cv.put(V_HANGUL, "kpr3");
		cv.put(GRUP, "c");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "c4");
		cv.put(BAHASA, "Datang");
		cv.put(HANGUL, "오다");
		cv.put(ROMAJI, "Datang");
		cv.put(V_HANGUL, "kpr4");
		cv.put(GRUP, "c");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "c5");
		cv.put(BAHASA, "Sayang sekali");
		cv.put(HANGUL, "아깝다");
		cv.put(ROMAJI, "Aggapda");
		cv.put(V_HANGUL, "kpr5");
		cv.put(GRUP, "c");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "c6");
		cv.put(BAHASA, "Senang");
		cv.put(HANGUL, "기쁘다");
		cv.put(ROMAJI, "Gippeuda");
		cv.put(V_HANGUL, "kpr6");
		cv.put(GRUP, "c");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "c7");
		cv.put(BAHASA, "Makanan");
		cv.put(HANGUL, "음식");
		cv.put(ROMAJI, "Eumsik");
		cv.put(V_HANGUL, "kpr7");
		cv.put(GRUP, "c");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "c8");
		cv.put(BAHASA, "Hati-Hati");
		cv.put(HANGUL, "조심하다");
		cv.put(ROMAJI, "Josimhada");
		cv.put(V_HANGUL, "kpr8");
		cv.put(GRUP, "c");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "c9");
		cv.put(BAHASA, "Selamat jalan");
		cv.put(HANGUL, "안녕히 계세요");
		cv.put(ROMAJI, "Annyounghi gaseyo");
		cv.put(V_HANGUL, "kpr9");
		cv.put(GRUP, "c");
		db.insert("KOSAKATA", KEY_ID, cv);
		//END kosakata Perpisahan 
		
		//START kosakata Penerbangan
		cv.put(KEY_ID, "d1");
		cv.put(BAHASA, "Formulis bea cukai");
		cv.put(HANGUL, "세관 신고서");
		cv.put(ROMAJI, "Saegwan singosou");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "d");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "d2");
		cv.put(BAHASA, "Putih");
		cv.put(HANGUL, "하얀색");
		cv.put(ROMAJI, "Hayansek");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "d");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "d3");
		cv.put(BAHASA, "Kuning");
		cv.put(HANGUL, "빨간색");
		cv.put(ROMAJI, "Ppalgansaek");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "d");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "d4");
		cv.put(BAHASA, "Berapa lama");
		cv.put(HANGUL, "얼마나");
		cv.put(ROMAJI, "Olmana");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "d");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "d5");
		cv.put(BAHASA, "Imigrasi");
		cv.put(HANGUL, "이미국");
		cv.put(ROMAJI, "Imiguk");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "d");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "d6");
		cv.put(BAHASA, "Catatan kesehatan");
		cv.put(HANGUL, "건강기락");
		cv.put(ROMAJI, "Gonganggirok");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "d");
		db.insert("KOSAKATA", KEY_ID, cv);	
		//END kosakata Penerbangan
		
		
		//START Kosakata Terminal
		cv.put(KEY_ID, "e1");
		cv.put(BAHASA, "Pasport");
		cv.put(HANGUL, "여권");
		cv.put(ROMAJI, "Yougwoun");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "e");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "e2");
		cv.put(BAHASA, "Lihat");
		cv.put(HANGUL, "보");
		cv.put(ROMAJI, "Bo");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "e");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "e3");
		cv.put(BAHASA, "Kenapa");
		cv.put(HANGUL, "왜");
		cv.put(ROMAJI, "Wae");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "e");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "e4");
		cv.put(BAHASA, "Datang");
		cv.put(HANGUL, "왔어요");
		cv.put(ROMAJI, "Owasouyo");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "e");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "e5");
		cv.put(BAHASA, "Berwisata");
		cv.put(HANGUL, "여행하다");
		cv.put(ROMAJI, "Younghaenghada");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "e");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "e6");
		cv.put(BAHASA, "Visa");
		cv.put(HANGUL, "비자");
		cv.put(ROMAJI, "Bija");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "e");
		db.insert("KOSAKATA", KEY_ID, cv);
		//END Kosakata Terminal
		
		
		//START kosakata Hotel
		cv.put(KEY_ID, "f1");
		cv.put(BAHASA, "Kamar");
		cv.put(HANGUL, "방");
		cv.put(ROMAJI, "Bang");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "f");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "f2");
		cv.put(BAHASA, "Memesan");
		cv.put(HANGUL, "예약하다");
		cv.put(ROMAJI, "Yeyakhada");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "f");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "f3");
		cv.put(BAHASA, "Nomor 206");
		cv.put(HANGUL, "이백육호");
		cv.put(ROMAJI, "Ibaekyukho");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "f");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "f4");
		cv.put(BAHASA, "Lantai 13");
		cv.put(HANGUL, "시삼 층의");
		cv.put(ROMAJI, "Sisamcheungeui");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "f");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "f5");
		cv.put(BAHASA, "Kunci");
		cv.put(HANGUL, "열쇠");
		cv.put(ROMAJI, "Youlswi");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "f");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "f6");
		cv.put(BAHASA, "Selamat beristirahat");
		cv.put(HANGUL, "잘 쉬십시오");
		cv.put(ROMAJI, "Jal swisipsio");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "f");
		db.insert("KOSAKATA", KEY_ID, cv);
		//END Kosakata Hotel
		
		
		//START Kosakata Jalan Raya
		cv.put(KEY_ID, "g1");
		cv.put(BAHASA, "Permisi");
		cv.put(HANGUL, "실례합니다");
		cv.put(ROMAJI, "Sillyehamnida");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "g");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "g2");
		cv.put(BAHASA, "Tidak tahu");
		cv.put(HANGUL, "모르다");
		cv.put(ROMAJI, "Moreuda");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "g");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "g3");
		cv.put(BAHASA, "Jalan");
		cv.put(HANGUL, "길");
		cv.put(ROMAJI, "Gil");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "g");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "g4");
		cv.put(BAHASA, "Disini");
		cv.put(HANGUL, "여가");
		cv.put(ROMAJI, "Yougi");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "g");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "g5");
		cv.put(BAHASA, "Pergi");
		cv.put(HANGUL, "갑니다");
		cv.put(ROMAJI, "Kamnida");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "g");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "g6");
		cv.put(BAHASA, "Tempat");
		cv.put(HANGUL, "장소");
		cv.put(ROMAJI, "Jangso");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "g");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "g7");
		cv.put(BAHASA, "Sedikit");
		cv.put(HANGUL, "적다");
		cv.put(ROMAJI, "Joukda");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "g");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "g8");
		cv.put(BAHASA, "Jauh");
		cv.put(HANGUL, "멀다");
		cv.put(ROMAJI, "Moulda");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "g");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "g9");
		cv.put(BAHASA, "Bagaimana");
		cv.put(HANGUL, "어떻게");
		cv.put(ROMAJI, "Otteoke");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "g");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "g10");
		cv.put(BAHASA, "Kereta bawah tanah");
		cv.put(HANGUL, "지하철");
		cv.put(ROMAJI, "Jihachoul");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "g");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "g11");
		cv.put(BAHASA, "Jalan kaki");
		cv.put(HANGUL, "걷다");
		cv.put(ROMAJI, "Goudda");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "g");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		cv.put(KEY_ID, "g12");
		cv.put(BAHASA, "Indah");
		cv.put(HANGUL, "아금답다");
		cv.put(ROMAJI, "Areumdapda");
		cv.put(V_HANGUL, "null");
		cv.put(GRUP, "g");
		db.insert("KOSAKATA", KEY_ID, cv);
		
		//END Kosakata Jalan
	
	}
	
	
	// method delAllAdata untuk menghapus data di table.
	public void delAllData(SQLiteDatabase db) {
		db.delete("HURUF_VOKAL", null, null);
		db.delete("HURUF_KONSONAN", null, null);
		db.delete("ANGKA_SINO", null, null);
		db.delete("ANGKA_ASLI", null, null);
		db.delete("PERKENALAN", null, null);
		db.delete("PERTEMUAN_PERTAMA",null, null);
		db.delete("PERPISAHAN",null, null);
		db.delete("PENERBANGAN",null, null);
		db.delete("TERMINAL_KEDATANGAN",null, null);
		db.delete("KOSAKATA", null, null);
	}
	
	public Cursor fetchDataHurufVokal(SQLiteDatabase db) {
		return db.query("HURUF_VOKAL", new String[] { KEY_ID, HANGUL, ROMAJI, BAHASA, V_HANGUL }, null, null,null, null, null);
	}
	
	public Cursor fetchDataHurufKonsonan(SQLiteDatabase db) {
		return db.query("HURUF_KONSONAN", new String[] { KEY_ID, HANGUL, ROMAJI, BAHASA, V_HANGUL }, null, null,null, null, null);
	}
	
	public Cursor fetchDataAngkaSino(SQLiteDatabase db) {
		return db.query("ANGKA_SINO", new String[] { KEY_ID, ANGKA, HANGUL, ROMAJI , V_HANGUL}, null, null,null, null, null);
	}
	
	public Cursor fetchDataAngkaAsli(SQLiteDatabase db) {
		return db.query("ANGKA_ASLI", new String[] { KEY_ID, ANGKA, HANGUL, ROMAJI, V_HANGUL }, null, null,null, null, null);
	}
	
	public Cursor fetchDataPerkenalan(SQLiteDatabase db) {
		return db.query("PERKENALAN", new String[] { KEY_ID, BAHASA, HANGUL, ROMAJI , V_HANGUL}, null, null,null, null, null);
	}
	
	public Cursor fetchDataPertemuanPertama(SQLiteDatabase db) {
		return db.query("PERTEMUAN_PERTAMA", new String[] { KEY_ID, BAHASA, HANGUL, ROMAJI, V_HANGUL }, null, null,null, null, null);
	}
	
	public Cursor fetchDataPerpisahan(SQLiteDatabase db) {
		return db.query("PERPISAHAN", new String[] { KEY_ID, BAHASA, HANGUL, ROMAJI, V_HANGUL }, null, null,null, null, null);
	}
	
	public Cursor fetchDataPenerbangan(SQLiteDatabase db) {
		return db.query("PENERBANGAN", new String[] { KEY_ID, BAHASA, HANGUL, ROMAJI, V_HANGUL }, null, null,null, null, null);
	}
	
	public Cursor fetchDataTerminalKedatangan(SQLiteDatabase db) {
		return db.query("TERMINAL_KEDATANGAN", new String[] { KEY_ID, BAHASA, HANGUL, ROMAJI, V_HANGUL }, null, null,null, null, null);
	}
	
	public Cursor fetchDataHotel(SQLiteDatabase db) {
		return db.query("HOTEL", new String[] { KEY_ID, BAHASA, HANGUL, ROMAJI, V_HANGUL }, null, null,null, null, null);
	}
	
	public Cursor fetchDataJalan(SQLiteDatabase db) {
		return db.query("JALAN", new String[] { KEY_ID, BAHASA, HANGUL, ROMAJI, V_HANGUL }, null, null,null, null, null);
	}
	
	public Cursor fetchDataKosakataPerkenalan(SQLiteDatabase db) {
		return db.query("KOSAKATA", new String[] { KEY_ID, BAHASA, HANGUL, ROMAJI, V_HANGUL, GRUP }, "grup_percakapan=?" , new String[] {"a"},null, null, null);
	}
	
	public Cursor fetchDataKosakataPertemuanPertama(SQLiteDatabase db) {
		return db.query("KOSAKATA", new String[] { KEY_ID, BAHASA, HANGUL, ROMAJI, V_HANGUL, GRUP }, "grup_percakapan=?" , new String[] {"b"},null, null, null);
	}
	
	public Cursor fetchDataKosakataPerpisahan(SQLiteDatabase db) {
		return db.query("KOSAKATA", new String[] { KEY_ID, BAHASA, HANGUL, ROMAJI, V_HANGUL, GRUP }, "grup_percakapan=?" , new String[] {"c"},null, null, null);
	}
	
	public Cursor fetchDataKosakataPenerbangan(SQLiteDatabase db) {
		return db.query("KOSAKATA", new String[] { KEY_ID, BAHASA, HANGUL, ROMAJI, V_HANGUL, GRUP }, "grup_percakapan=?" , new String[] {"d"},null, null, null);
	}
	
	public Cursor fetchDataKosakataTerminal(SQLiteDatabase db) {
		return db.query("KOSAKATA", new String[] { KEY_ID, BAHASA, HANGUL, ROMAJI, V_HANGUL, GRUP }, "grup_percakapan=?" , new String[] {"e"},null, null, null);
	}
	
	public Cursor fetchDataKosakataHotel(SQLiteDatabase db) {
		return db.query("KOSAKATA", new String[] { KEY_ID, BAHASA, HANGUL, ROMAJI, V_HANGUL, GRUP }, "grup_percakapan=?" , new String[] {"f"},null, null, null);
	}
	
	public Cursor fetchDataKosakataJalan(SQLiteDatabase db) {
		return db.query("KOSAKATA", new String[] { KEY_ID, BAHASA, HANGUL, ROMAJI, V_HANGUL, GRUP }, "grup_percakapan=?" , new String[] {"g"},null, null, null);
	}
	
	public Cursor fetchDataFavorite(SQLiteDatabase db){
		return db.rawQuery(
				"SELECT _id AS _id, hangul AS hangul, romaji AS romaji, bahasa AS bahasa, v_hangul AS v_hangul, 'HURUF_VOKAL' AS nama_tabel FROM HURUF_VOKAL WHERE favorite = '1' UNION " +
				"SELECT _id AS _id, hangul AS hangul, romaji AS romaji, bahasa AS bahasa, v_hangul AS v_hangul, 'HURUF_KONSONAN' AS nama_tabel  FROM HURUF_KONSONAN WHERE favorite = '1' UNION " +
				"SELECT _id AS _id, hangul AS hangul, romaji AS romaji, angka AS bahasa, v_hangul AS v_hangul, 'ANGKA_SINO' AS nama_tabel  FROM ANGKA_SINO WHERE favorite = '1' UNION " +
				"SELECT _id AS _id, hangul AS hangul, romaji AS romaji, angka AS bahasa, v_hangul AS v_hangul, 'ANGKA_ASLI' AS nama_tabel  FROM ANGKA_ASLI WHERE favorite = '1' UNION " +
				"SELECT _id AS _id, hangul AS hangul, romaji AS romaji, bahasa AS bahasa, v_hangul AS v_hangul, 'PERKENALAN' AS nama_tabel  FROM PERKENALAN WHERE favorite = '1' UNION " +
				"SELECT _id AS _id, hangul AS hangul, romaji AS romaji, bahasa AS bahasa, v_hangul AS v_hangul, 'PERTEMUAN_PERTAMA' AS nama_tabel  FROM PERTEMUAN_PERTAMA WHERE favorite = '1' UNION " +
				"SELECT _id AS _id, hangul AS hangul, romaji AS romaji, bahasa AS bahasa, v_hangul AS v_hangul, 'PERPISAHAN' AS nama_tabel  FROM PERPISAHAN WHERE favorite = '1' UNION " +
				"SELECT _id AS _id, hangul AS hangul, romaji AS romaji, bahasa AS bahasa, v_hangul AS v_hangul, 'PENERBANGAN' AS nama_tabel  FROM PENERBANGAN WHERE favorite = '1' UNION " +
				"SELECT _id AS _id, hangul AS hangul, romaji AS romaji, bahasa AS bahasa, v_hangul AS v_hangul, 'TERMINAL_KEDATANGAN' AS nama_tabel  FROM TERMINAL_KEDATANGAN WHERE favorite = '1' UNION " +
				"SELECT _id AS _id, hangul AS hangul, romaji AS romaji, bahasa AS bahasa, v_hangul AS v_hangul, 'HOTEL' AS nama_tabel  FROM HOTEL WHERE favorite = '1' UNION " +
				"SELECT _id AS _id, hangul AS hangul, romaji AS romaji, bahasa AS bahasa, v_hangul AS v_hangul, 'JALAN' AS nama_tabel  FROM JALAN WHERE favorite = '1'"				
				, null);
	}
	
	public int updateDataHurufVokal(SQLiteDatabase db, String id){
		ContentValues cv = new ContentValues();
		cv.put(FAVORITE, "1");
		try {
			return db.update("HURUF_VOKAL", cv ,"_id = '"+id+"'",null);
		} catch (SQLiteConstraintException e){
			Log.i("favorite_", "Error Constraint");
	        return 0;
		}
	}		
	
	public int updateDataHurufKonsonan(SQLiteDatabase db, String id){
		ContentValues cv = new ContentValues();
		cv.put(FAVORITE, "1");
		try {
			return db.update("HURUF_KONSONAN", cv ,"_id = '"+id+"'",null);
		} catch (SQLiteConstraintException e){
			Log.i("favorite_", "Error Constraint");
	        return 0;
		}
	}		
	
	public int updateDataAngka(SQLiteDatabase db, String id){
		ContentValues cv = new ContentValues();
		cv.put(FAVORITE, "1");
		try {
			return db.update("ANGKA_ASLI", cv ,"_id = '"+id+"'",null);
		} catch (SQLiteConstraintException e){
			Log.i("favorite_", "Error Constraint");
	        return 0;
		}
	}

	public int updateDataAngkaSino(SQLiteDatabase db, String id){
		ContentValues cv = new ContentValues();
		cv.put(FAVORITE, "1");
		try {
			return db.update("ANGKA_SINO", cv ,"_id = '"+id+"'",null);
		} catch (SQLiteConstraintException e){
			Log.i("favorite_", "Error Constraint");
	        return 0;
		}
	}	
	
	public int updateDataPerkenalan(SQLiteDatabase db, String id){
		ContentValues cv = new ContentValues();
		cv.put(FAVORITE, "1");
		try {
			return db.update("PERKENALAN", cv ,"_id = '"+id+"'",null);
		} catch (SQLiteConstraintException e){
			Log.i("favorite_", "Error Constraint");
	        return 0;
		}
	}	
	
	public int updateDataPertemuanPertama(SQLiteDatabase db, String id){
		ContentValues cv = new ContentValues();
		cv.put(FAVORITE, "1");
		try {
			return db.update("PERTEMUAN_PERTAMA", cv ,"_id = '"+id+"'",null);
		} catch (SQLiteConstraintException e){
			Log.i("favorite_", "Error Constraint");
	        return 0;
		}
	}
		
	public int updateDataPerpisahan(SQLiteDatabase db, String id){
		ContentValues cv = new ContentValues();
		cv.put(FAVORITE, "1");
		try {
			return db.update("PERPISAHAN", cv ,"_id = '"+id+"'",null);
		} catch (SQLiteConstraintException e){
			Log.i("favorite_", "Error Constraint");
	        return 0;
		}
	}

	public int updateDataPenerbangan(SQLiteDatabase db, String id){
		ContentValues cv = new ContentValues();
		cv.put(FAVORITE, "1");
		try {
			return db.update("PENERBANGAN", cv ,"_id = '"+id+"'",null);
		} catch (SQLiteConstraintException e){
			Log.i("favorite_", "Error Constraint");
	        return 0;
		}
	}
	
	public int updateDataTerminal(SQLiteDatabase db, String id){
		ContentValues cv = new ContentValues();
		cv.put(FAVORITE, "1");
		try {
			return db.update("TERMINAL_KEDATANGAN", cv ,"_id = '"+id+"'",null);
		} catch (SQLiteConstraintException e){
			Log.i("favorite_", "Error Constraint");
	        return 0;
		}
	}
	
	public int updateDataHotel(SQLiteDatabase db, String id){
		ContentValues cv = new ContentValues();
		cv.put(FAVORITE, "1");
		try {
			return db.update("HOTEL", cv ,"_id = '"+id+"'",null);
		} catch (SQLiteConstraintException e){
			Log.i("favorite_", "Error Constraint");
	        return 0;
		}
	}
	
	public int updateDataJalan(SQLiteDatabase db, String id){
		ContentValues cv = new ContentValues();
		cv.put(FAVORITE, "1");
		try {
			return db.update("JALAN", cv ,"_id = '"+id+"'",null);
		} catch (SQLiteConstraintException e){
			Log.i("favorite_", "Error Constraint");
	        return 0;
		}
	}
	
	public int removeDataFavorite(SQLiteDatabase db, String id, String tbl){
		ContentValues cv = new ContentValues();
		cv.put(FAVORITE, "0");
		try {
			return db.update(tbl, cv ,"_id = '"+id+"'",null);
		} catch (SQLiteConstraintException e){
			Log.i("remove_favorite_", "Error Constraint");
	        return 0;
		}
	}
	
	@Override
	public void onCreate(SQLiteDatabase db) {		
		createTable(db);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		 if (oldVersion >= newVersion)
		        return;
		 	db.execSQL("DROP TABLE IF EXISTS HURUF_VOKAL");
		 	db.execSQL("DROP TABLE IF EXISTS HURUF_KONSONAN");
		 	db.execSQL("DROP TABLE IF EXISTS ANGKA_SINO");
		    db.execSQL("DROP TABLE IF EXISTS ANGKA_ASLI");
		    db.execSQL("DROP TABLE IF EXISTS PERKENALAN");
		    db.execSQL("DROP TABLE IF EXISTS PERTEMUAN_PERTAMA");
		    db.execSQL("DROP TABLE IF EXISTS PERPISAHAN");
		    db.execSQL("DROP TABLE IF EXISTS PENERBANGAN");
		    db.execSQL("DROP TABLE IF EXISTS TERMINAL_KEDATANGAN");
		    db.execSQL("DROP TABLE IF EXISTS HOTEL");
		    db.execSQL("DROP TABLE IF EXISTS JALAN");
		    db.execSQL("DROP TABLE IF EXISTS KOSAKATA");
		    onCreate(db);

	}
}
